import { defineStore } from "pinia";
import { reactive, ref } from "vue";

// use setup function
export const webStore = defineStore("web", ()=>{

    const web = reactive({
        title: "laoda",
        url: "www.laoda.com"
    })

    const users = ref(1000)

    const userAdd = ()=>{
        users.value++
    }

    return {
        web,
        users,
        userAdd
    }
}, {
    persist: true
})